﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class pandian11 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "CompanyId",
                table: "TStocktakingOrders");

            migrationBuilder.RenameColumn(
                name: "CompanyName",
                table: "TStocktakingOrders",
                newName: "storeLocationRemark");

            migrationBuilder.AddColumn<string>(
                name: "deptName",
                table: "TStocktakingOrders",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "materialCode",
                table: "TStocktakingOrders",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<string>(
                name: "materialNorms",
                table: "TStocktakingOrders",
                type: "nvarchar(max)",
                nullable: true);

            migrationBuilder.AddColumn<long>(
                name: "planId",
                table: "TStocktakingOrders",
                type: "bigint",
                nullable: false,
                defaultValue: 0L);

            migrationBuilder.AddColumn<decimal>(
                name: "profitLostAmount",
                table: "TStocktakingOrderDetails",
                type: "decimal(18,2)",
                nullable: false,
                defaultValue: 0m);
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "deptName",
                table: "TStocktakingOrders");

            migrationBuilder.DropColumn(
                name: "materialCode",
                table: "TStocktakingOrders");

            migrationBuilder.DropColumn(
                name: "materialNorms",
                table: "TStocktakingOrders");

            migrationBuilder.DropColumn(
                name: "planId",
                table: "TStocktakingOrders");

            migrationBuilder.DropColumn(
                name: "profitLostAmount",
                table: "TStocktakingOrderDetails");

            migrationBuilder.RenameColumn(
                name: "storeLocationRemark",
                table: "TStocktakingOrders",
                newName: "CompanyName");

            migrationBuilder.AddColumn<int>(
                name: "CompanyId",
                table: "TStocktakingOrders",
                type: "int",
                nullable: true);
        }
    }
}
